from django.contrib import admin

from .models import Flight, Airport, Passenger


# Register your models here.
# 自定义展示数据
class AirportsAdmin(admin.ModelAdmin):
    list_display = ('id', 'code', 'city')


class FlightAdmin(admin.ModelAdmin):
    list_display = ('id', "origin", 'destination', 'duration')


admin.site.register(Airport, AirportsAdmin)
admin.site.register(Flight, FlightAdmin)
admin.site.register(Passenger)
